var App = App || {};

App.general = {
    FRONTAPI_URL: '',
    FRONTAPI_PREFIX: '/front-api/v1',
    STATIC_URL: 'http://assets.social-cdn.com/cdn',
    LOGGER_MODULE: 'sentry_logger',
    SENTRY_PUBLIC_DSN: 'https://f682a709f6eb4033a7d6e4e2a25e0aa5@app.getsentry.com/10678',
    LOG_LEVEL: 1, // ERROR
    LOGIN_PAGE: '/front/login/',
    LOGIN_URL: '/front-api/v1/login/',
    LOGOUT_URL: '/front-api/v1/logout/',
    CURRENT_USER_URL: '/front-api/v1/current/',
    CURRENT_USER_TIMEOUT: 60 * 1000,
    DEFAULT_PAGE_AFTER_LOGIN: 'index.html',
    PAGE_LAYOUT: 'templates/page.hjs',
    SVG_PATH: '/public/svg',
    ENVIRONMENT: 'production',
    USE_PRECOMPILED_TEMPLATES: true,
    PASS_THROUGH_EXCEPTIONS: false,
    IMAGE_UPLOAD_BUCKET_URL: 'https://s3.amazonaws.com/unleashed-static/',
    MIXPANEL_CONFIG: { test: false, debug: false, cross_subdomain_cookie: false },
    MIXPANEL_TOKEN: "9f8b3d1b3546a9679d0750b256ee824d",
    // Timespan after which the 'idle' event is triggered.
    CHECK_USER_INACTIVE_INTERVAL: 15*60*1000, // 15min
    // Interval to check maintenance mode.
    CHECK_MAINTENANCE_MODE_INTERVAL: 10*1000, // 10s
    // Static maintenance page
    MAINTENANCE_PAGE: '/maintenance',
    // Number of consecutive timeouted requests.
    OFFLINE_TIMEOUT_REQUESTS_LIMIT: 5,
    // JS file to be used as entry-point for the application
    ENTRY_POINT: '{{STATIC_URL}}/'+App.version+'/main.js',
    // DO NOT REMOVE THIS - WHITELABEL CUSTOMIZATIONS!
    EXTRA_BRANDING: ['/assets/custom.css']
};

// Can't use precompiled templates if not in production
// because the bundle.sh is not run every time and prob
// tpl.js doesn't exist
if (App.general.ENVIRONMENT !== 'production')
    App.general.USE_PRECOMPILED_TEMPLATES = false;

if (typeof module != 'undefined') {
    module.exports.general = App.general;
}
